/*
 * ADC.h
 *
 * Created: 9/04/2012 4:52:27 PM
 *  Author: Richard
 */ 


#ifndef ADC_H_
#define ADC_H_

#include <avr/io.h>
#include "cdef.h"
#include "DIO.h"


#define ADC_nBufferSize		((uint8)(8))

typedef enum
{
	ADC_nenFirst = 0,
	
	#if 0
	/* Start integration */
	ADC_nenVIN_SENSE = ADC_nenFirst,
	/* End integrations */
	#else
	ADC_nenCurrent = ADC_nenFirst,
	ADC_nenVoltage,
	#endif
	
	ADC_nenNumberOfChannels
} ADC_tenChannels;

void ADC_vInit( void );
uint16 ADC_u16GetValue( uint8 enChannel );
DIO_tenLogicLevel ADC_enGetLogicValue( DIO_tenPinName enPinName );

#endif /* ADC_H_ */
